<template>
  <div>
    <!-- 渲染角色列表 -->
 <el-checkbox-group v-model="roleIdslist">
  <el-checkbox :label="item.id" v-for='(item,index) in allrows' :key='index'>{{item.name}} </el-checkbox>
  
</el-checkbox-group>
    <el-row class="footer" type="flex" justify="center">
      <el-col :span="12">
        <el-button type="primary" size="small" @click="enter">确定</el-button>
        <el-button size="small" @click="cancleDialog">取消</el-button>
      </el-col>
    </el-row>
  </div>
</template>
<script>

export default{
    props:{
        allrows:{
            type:Array,
            default:()=>[]
        }
    },
     data () {
	return {
	  roleIdslist: [] // 保存当前选中的权限列表
	}
  },
  created(){

  },
 methods:{
    enter(){
        this.$emit("enter",this.roleIdslist)
    },
    cancleDialog(){
         this.$emit("cancleDialog",false)
    }
 }
}
</script>



<style lang="scss" scoped>
.footer {
  margin-top: 30px;
}
</style>
